import axios from "axios"


//判断管理员是否登陆成功
export function getLoginStatus(params) {
	return axios.post('http://localhost:8081/login/status',params,{
		headers:{'Content-Type': 'application/x-www-form-urlencoded'}
	}).then(response => {
		return response.data;
	});
} 
//判断用户是否注册成功
export function getRegisterStatus(params) {
	return axios.post('http://localhost:8081/register/status',params,{
		headers:{'Content-Type': 'application/x-www-form-urlencoded'}
	}).then(response => {
		return response.data;
	});
} 
//获取用户角色
export function getUserRoles() {
	return axios.get('http://localhost:8081/user/role',{
		headers:{'Content-Type': 'application/x-www-form-urlencoded'}
	}).then(response => {
		return response.data;
	});
} 

//获取用户个人简介
export function getUserProfile(params) {
	return axios.post('http://localhost:8081/user/profile',params,{
		headers:{'Content-Type': 'application/x-www-form-urlencoded'}
	}).then(response => {
		return response.data;
	});
} 

//获取居民列表
export function getResidentList() {
	return axios.get('http://localhost:8081/api/residents',{
		headers:{'Content-Type': 'application/x-www-form-urlencoded'}
	}).then(response => {
		return response.data;
	});
} 